const state = {
  urlData: {}
}

const mutations = {
  SET_URLDATA: (state, data) => {
    state.urlData = data
  }
}

const actions = {
  setUrlData({ commit }, type, data) {
    switch (type) {
      case 'set':
        commit('SET_URLDATA', data)
        break
      case 'remove':
        commit('SET_URLDATA', {})
        break
    }
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
